import Vue from 'vue'
import VueRouter from 'vue-router'
import App from '../app'
import Index from '../page/home'
import Mine from "../page/mine"
import Detail from "../page/detail"
import Login from "../page/login"


Vue.use(VueRouter)
const routes = [{
    path: '/',
    component: App,
    children: [{
        path: '/index',
        name: 'Index',
        component: Index
    }, {
        path: '/mine',
        name: 'mine',
        component: Mine
    }, {
        path: '/detail/:id',
        name: 'Detail',
        component: Detail
    }, {
        path: '/login',
        name: 'Login',
        component: Login
    }]
}]

const router = new VueRouter({
    routes: routes,
    linkActiveClass: 'active', // router-link的选中状态的class，也有一个默认的值

})

export default router